﻿#ifndef TANKDATA_H
#define TANKDATA_H

#include <cstdint>
// 协议数据结构
typedef unsigned char BYTE;
typedef unsigned short WORD;

#define DMA_DATA_SIZE 4800

#pragma pack(push) // 保存对齐状态
#pragma pack(1)    // 设定为1字节对齐
struct UTCTime
{                       // UTCTime时间格式定义
    WORD Year = 0;      // 年
    BYTE Month = 0;     // 月
    BYTE Day = 0;       // 日
    BYTE Hour = 0;      // 时
    BYTE Minute = 0;    // 分
    BYTE Second = 0;    // 秒
    BYTE Reserved = 0;  // 保留字节
    WORD TSeconds = 0;  // 0-999
    WORD JulianDay = 0; // 从1月1日开始的总天数
};
struct Tank_Status
{                                // 水密仓状态信息温湿度定义
    float Hmidity[10] = {0};     // 湿度
    float Temperature[10] = {0}; // 温度
};
// 数据包头定义

struct pack_Control_Head
{
    unsigned int Massage_Header = 0xa55ab55b; // 帧头（4字节)
    unsigned int Device_Address;              // 目的地址
    unsigned char Opreation;
    unsigned short KeyWord;
    uint16_t DataLength; // 数据长度（2字节)
};
// 系统时间0x0101
struct pack_Control_To_PC_SystemTime
{
    unsigned int Massage_Header = 0xa55ab55b; // 帧头（4字节)
    unsigned int Device_Address = 0x00;       // 目的地址
    unsigned char Opreation = 0x82;
    unsigned short KeyWord = 0x0101;
    uint16_t DataLength = sizeof(systime); // 数据长度（2字节)
    long long int systime;
    unsigned short Check_Sum = 0;
    unsigned short Massage_Tail = 0xff0d;
};

// 信号类型0x0102
struct pack_Control_To_SignalType_H
{
    unsigned int Massage_Header = 0xa55ab55b; // 帧头（4字节)
    unsigned int Device_Address;              // 目的地址
    unsigned char Opreation;
    unsigned short KeyWord;
    uint16_t DataLength; // 数据长度（2字节)
    unsigned char signaltype_H;
    unsigned short Check_Sum;
    unsigned short Massage_Tail = 0xff0d;
};
struct pack_Control_To_SignalType_L
{
    unsigned int Massage_Header = 0xa55ab55b; // 帧头（4字节)
    unsigned int Device_Address;              // 目的地址
    unsigned char Opreation;
    unsigned short KeyWord;
    uint16_t DataLength; // 数据长度（2字节)
    unsigned char signaltype_L;
    unsigned short Check_Sum;
    unsigned short Massage_Tail = 0xff0d;
};

// Gain增益0x0104
struct pack_PC_To_Control_TVG_Gain
{
    unsigned int Massage_Header = 0xa55ab55b; // 帧头（4字节)
    unsigned int Device_Address;              // 目的地址
    unsigned char Opreation = 0x82;
    unsigned short KeyWord;
    uint16_t DataLength; // 数据长度（2字节)
    unsigned char gain;
    unsigned short Check_Sum;
    unsigned short Massage_Tail = 0xff0d;
};

// 发射功率0x0105
struct pack_PC_To_Control_WorkPower
{
    unsigned int Massage_Header = 0xa55ab55b; // 帧头（4字节)
    unsigned int Device_Address;              // 目的地址
    unsigned char Opreation;
    unsigned short KeyWord;
    uint16_t DataLength; // 数据长度（2字节)
    unsigned char work_power;
    unsigned short Check_Sum;
    unsigned short Massage_Tail = 0xff0d;
};

// TVG参数
struct TVG
{
    float TVG_Alpha;
    float TVG_Beta;
    float TVG_Gamma;
};
// TVG状态控制参数 0x0106
struct pack_PC_To_Control_TVG_H
{
    unsigned int Massage_Header = 0xa55ab55b; // 帧头（4字节)
    unsigned int Device_Address;              // 目的地址
    unsigned char Opreation;
    unsigned short KeyWord;
    uint16_t DataLength; // 数据长度（2字节)
    TVG m_TVG_H;
    unsigned short Check_Sum;
    unsigned short Massage_Tail = 0xff0d;
};
struct pack_PC_To_Control_TVG_L
{
    unsigned int Massage_Header = 0xa55ab55b; // 帧头（4字节)
    unsigned int Device_Address;              // 目的地址
    unsigned char Opreation;
    unsigned short KeyWord;
    uint16_t DataLength; // 数据长度（2字节)
    TVG m_TVG_L;
    unsigned short Check_Sum;
    unsigned short Massage_Tail = 0xff0d;
};

// 工作方式0x0107
struct pack_PC_To_Control_WorkMode
{
    unsigned int Massage_Header = 0xa55ab55b; // 帧头（4字节)
    unsigned int Device_Address;              // 目的地址
    unsigned char Opreation;
    unsigned short KeyWord;
    uint16_t DataLength; // 数据长度（2字节)
    unsigned char workmode;
    unsigned short Check_Sum;
    unsigned short Massage_Tail = 0xff0d;
};

// Temp
struct Temp_Data
{
    float Temperature_one;
    float Temperature_second;
    float Temperature_Three;
};
// Temp  KeyWord=0x0150 upstream
struct pack_Control_To_PC_TEMP
{
    unsigned int Massage_Header = 0xa55ab55b; // 帧头（4字节)
    unsigned int Device_Address;              // 目的地址
    unsigned char Opreation;
    unsigned short KeyWord;
    uint16_t DataLength; // 数据长度（2字节)
    Temp_Data m_Temp_Data;
    unsigned short Check_Sum;
    unsigned short Massage_Tail = 0xff0d;
};

// Humidity
struct Humidity_Data
{
    float Hmidity_one;
    float Hmidity_second;
    float Hmidity_Three;
};
// Humidity KeyWord=0x0151
struct pack_Control_To_PC_Humidity
{
    unsigned int Massage_Header = 0xa55ab55b; // 帧头（4字节)
    unsigned int Device_Address;              // 目的地址
    unsigned char Opreation;
    unsigned short KeyWord;
    uint16_t DataLength; // 数据长度（2字节)
    Humidity_Data m_Humidity_Data;
    unsigned short Check_Sum;
    unsigned short Massage_Tail = 0xff0d;
};

// 水密仓状态数据结构体定义 upstream  1s
struct SASTankStatus
{
    float fTotalStrage; // 系统容量
    float fUseStarge;   // 已用空间大小
    float fPercentage;  // 利用率
};
// 声纳湿端水密仓状态参数  KeyWord=0x0152 upstream
struct pack_Control_To_PC_SASTankStatus
{
    unsigned int Massage_Header = 0xa55ab55b; // 帧头（4字节)
    unsigned int Device_Address;              // 目的地址
    unsigned char Opreation;
    unsigned short KeyWord;
    uint16_t DataLength; // 数据长度（2字节)
    SASTankStatus m_SASTankStatus;
    unsigned short Check_Sum;
    unsigned short Massage_Tail = 0xff0d;
};

// 压力传感器 upstream
struct PressureHeight
{
    int Sensor_id;
    float fHeight;
};

// 压力传感器应答格式  KeyWord=0x0153 upstream
struct pack_Control_To_PC_PressureHeight
{
    unsigned int Massage_Header = 0xa55ab55b; // 帧头（4字节)
    unsigned int Device_Address;              // 目的地址
    unsigned char Opreation;
    unsigned short KeyWord;
    uint16_t DataLength; // 数据长度（2字节)
    PressureHeight m_PressureHeight;
    unsigned short Check_Sum;
    unsigned short Massage_Tail = 0xff0d;
};

// 深度开关 0x0154
struct pack_PC_To_Control_PressureHeight_EN
{
    unsigned int Massage_Header = 0xa55ab55b; // 帧头（4字节)
    unsigned int Device_Address;              // 目的地址
    unsigned char Opreation;
    unsigned short KeyWord;
    uint16_t DataLength; // 数据长度（2字节)
    unsigned char PressureHeight_EN;
    unsigned short Check_Sum;
    unsigned short Massage_Tail = 0xff0d;
};

// 姿态传感器 upstream
struct AltitudeSensor
{
    unsigned char Altitude_id;
    float fHeading; // 偏航
    float fPitch;   // 俯仰
    float fRoll;    // 横滚
};
// 姿态传感器应答  KeyWord=0x0155 upstream
struct pack_Control_To_PC_AltitudeSensor
{
    unsigned int Massage_Header = 0xa55ab55b; // 帧头（4字节)
    unsigned int Device_Address;              // 目的地址
    unsigned char Opreation;
    unsigned short KeyWord;
    uint16_t DataLength; // 数据长度（2字节)
    AltitudeSensor m_AltitudeSensor;
    unsigned short Check_Sum;
    unsigned short Massage_Tail = 0xff0d;
};

// 姿态开关 0x0156
struct pack_PC_To_Control_AltitudeSensor_EN
{
    unsigned int Massage_Header = 0xa55ab55b; // 帧头（4字节)
    unsigned int Device_Address;              // 目的地址
    unsigned char Opreation;
    unsigned short KeyWord;
    uint16_t DataLength; // 数据长度（2字节)
    unsigned char AltitudeSensor_EN;
    unsigned short Check_Sum;
    unsigned short Massage_Tail = 0xff0d;
};

// 声速0x0157
struct pack_PC_To_Control_SoundVelocity
{
    unsigned int Massage_Header = 0xa55ab55b; // 帧头（4字节)
    unsigned int Device_Address;              // 目的地址
    unsigned char Opreation;
    unsigned short KeyWord;
    uint16_t DataLength; // 数据长度（2字节)
    float sound_velocity;
    unsigned short Check_Sum;
    unsigned short Massage_Tail = 0xff0d;
};

// 高度计
struct Altimeter
{
    unsigned short fPluse_Number; // 脉冲数
    unsigned short fWork_Length;  // 工作距离
    float fHeight;                // 对底高度
    uint16_t iDataLength;         // 数据长度
    // float	*N;//剖面数据
};
// 高度计上传  KeyWord=0x0180 upstream
struct pack_Control_To_PC_Altimeter
{
    unsigned int Massage_Header = 0xa55ab55b; // 帧头（4字节)
    unsigned int Device_Address;              // 目的地址
    unsigned char Opreation;
    unsigned short KeyWord;
    uint16_t DataLength; // 数据长度（2字节)
    int data[2];
    unsigned short Check_Sum;
    unsigned short Massage_Tail = 0xff0d;
};

// 采集参数
struct Control_Signal
{
    float BandWidth;
    float PulseWidth;
    float rFs; // 采样率
    float rMin;
    float rMax;
    float PRI;
    float CarrierFrquncy;
    float fNumOfReceiver;
};

// 发射信号参数 KeyWord=0x1102 downstream
struct pack_PC_To_Control_Signal_H
{
    unsigned int Massage_Header = 0xa55ab55b; // 帧头（4字节)
    unsigned int Device_Address;              // 目的地址
    unsigned char Opreation;
    unsigned short KeyWord;
    uint16_t DataLength;
    Control_Signal m_Control_Signal_H;
    unsigned short Check_Sum;
    unsigned short Massage_Tail = 0xff0d;
};
struct pack_PC_To_Control_Signal_L
{
    unsigned int Massage_Header = 0xa55ab55b; // 帧头（4字节)
    unsigned int Device_Address;              // 目的地址
    unsigned char Opreation;
    unsigned short KeyWord;
    uint16_t DataLength;
    Control_Signal m_Control_Signal_L;
    unsigned short Check_Sum;
    unsigned short Massage_Tail = 0xff0d;
};
// 发射信号参数 KeyWord=0x1102 downstream

struct pack_PC_To_Control_WokingStart
{
    unsigned int Massage_Header = 0xa55ab55b; // 帧头（4字节)
    unsigned int Device_Address;              // 目的地址
    unsigned char Opreation;
    unsigned short KeyWord;
    uint16_t DataLength;
    unsigned char Wokingsonar;
    unsigned short Check_Sum;
    unsigned short Massage_Tail = 0xff0d;
};
// 声纳左禁发 0x1113
struct pack_PC_To_Control_L_Sonar
{
    unsigned int Massage_Header = 0xa55ab55b; // 帧头（4字节)
    unsigned int Device_Address;              // 目的地址
    unsigned char Opreation;
    unsigned short KeyWord;
    uint16_t DataLength; // 数据长度（2字节)
    uint8_t sonar;
    unsigned short Check_Sum;
    unsigned short Massage_Tail = 0xff0d;
};

// 内外触发模式
struct pack_PC_To_Control_TrigerMode
{
    unsigned int Massage_Header = 0xa55ab55b; // 帧头（4字节)
    unsigned int Device_Address;              // 目的地址
    unsigned char Opreation;
    unsigned short KeyWord;
    uint16_t DataLength; // 数据长度（2字节)
    uint8_t TrigerMode;
    unsigned short Check_Sum;
    unsigned short Massage_Tail = 0xff0d;
};
// 声呐原始数据
struct Pluse_Info
{
    unsigned int PingNumber;      // 脉冲编号
    unsigned int PacketTotal = 0; // 包总数
    unsigned int PacketNumber;    // 包编号
    uint64_t time;                // 脉冲发射时间
    unsigned char position;       // 左侧？右侧？ 1为左侧，2为右侧  0 双侧
    unsigned char channnel_num;   // 通道数
    int data[DMA_DATA_SIZE];      // 数据
};
// 声呐数据  KeyWord=0x5a 0xa5 0x5b 0xb5 upstream
struct pack_Control_To_PC_Sonar_data
{
    unsigned int Massage_Header = 0xa55ab55b; // 帧头（4字节)
    unsigned int Device_Address;              // 目的地址
    unsigned char Opreation;
    unsigned short KeyWord;
    uint16_t DataLength = sizeof(Pluse_Info); // 数据长度（2字节)
    Pluse_Info pluse_info;
    uint16_t Check_Sum;
    uint16_t Massage_Tail = 0xff0d;
};

struct Information
{
    uint8_t sonar;          // 声呐
    uint8_t sorting;        // 排序
    uint8_t years;          // 年份
    uint16_t numbering;     // 编号
    uint8_t firm_year;      // 固件年份
    uint8_t firm_month;     // 固件月份
    uint8_t version_number; // 版本号
    int64_t license_time;   // 许可时间
};
struct Device_Information
{
    unsigned int Massage_Header = 0xa55ab55b; // 帧头（4字节)
    unsigned int Device_Address;              // 目的地址
    unsigned char Opreation;
    unsigned short KeyWord;
    uint16_t DataLength = sizeof(Information); // 数据长度（2字节)
    Information m_information;
    unsigned short Check_Sum;
    unsigned short Massage_Tail = 0xff0d;
};
// 电压电流
struct Voltage_And_Current_Data
{
    unsigned char Count;
    unsigned int Main_V;
    unsigned int Main_A;
    unsigned int CollectA_V;
    unsigned int CollectA_A;
    unsigned int CollectB_V;
    unsigned int CollectB_A;
};
// 电压电流 KeyWord=0x1105
struct pack_PC_To_Control_Voltage_And_Current
{
    unsigned int Massage_Header = 0xa55ab55b; // 帧头（4字节)
    unsigned int Device_Address;              // 目的地址
    unsigned char Opreation;
    unsigned short KeyWord;
    uint16_t DataLength; // 数据长度（2字节)
    Voltage_And_Current_Data m_Voltage_And_Current_Data;
    unsigned short Check_Sum;
    unsigned short Massage_Tail = 0xff0d;
};
// 活性检测 keyword 0x0109
struct pack_PC_To_Control_Activity
{
    unsigned int Massage_Header = 0xa55ab55b; // 帧头（4字节)
    unsigned int Device_Address;              // 目的地址
    unsigned char Opreation;
    unsigned short KeyWord;
    uint16_t DataLength; // 数据长度（2字节)
    uint8_t Activity_Status;
    unsigned short Check_Sum;
    unsigned short Massage_Tail = 0xff0d;
};
// 低频延时
struct pack_PC_To_Control_L_Delay
{
    unsigned int Massage_Header = 0xa55ab55b; // 帧头（4字节)
    unsigned int Device_Address;              // 目的地址
    unsigned char Opreation;
    unsigned short KeyWord;
    uint16_t DataLength; // 数据长度（2字节)
    uint32_t Delay_Time;
    unsigned short Check_Sum;
    unsigned short Massage_Tail = 0xff0d;
};
// ARM SATA存盘控制
struct pack_PC_To_Control_SATA_Flag
{
    unsigned int Massage_Header = 0xa55ab55b; // 帧头（4字节)
    unsigned int Device_Address;              // 目的地址
    unsigned char Opreation;
    unsigned short KeyWord;
    uint16_t DataLength; // 数据长度（2字节)
    bool SATA_Flag;
    unsigned short Check_Sum;
    unsigned short Massage_Tail = 0xff0d;
};
/************* 湿端设备---->显控 ***************/

// unsigned short Working_Status = 0; //声纳工作状态控制应答

// struct Pluse_Info {             //声纳数据头
//     unsigned char KeyWord[5];      //关键字
//     int DataLength;             //数据长度
//     UTCTime m_sUTCTime;         //脉冲发射时刻时间
//     UTCTime m_cUTCTime;         //数据采集时刻时间
//     long long N_Div;            //当前发射脉冲对应的分频数
//     float PRI;                  //当前发射脉冲对应的PRI。
//     int PingNumber;             //当前采集脉冲编号
//     int position;               //见工作模式 例如bit0 双侧阵 bit1左侧阵  以此类推
//     int cur_count;              //当前场有效点数
//     int field_number;           //采集每场完整数据累计1
//     int iReserved[3];
//     float fReserved[4];
// };

/************* 显控---->湿端设备 ***************/
// struct Control_Signal {  //发射信号和采集参数
//     unsigned short H_SignalType = 0;  //前信号源信号形式
//     float H_CarrierFrquncy = 0;       //前信号源中心频率
//     float H_BandWidth = 0;            //前信号源信号带宽
//     float H_PulseWidth = 0;           //前信号源信号脉宽

//    unsigned short T_SignalType = 0;  //后信号源信号形式
//    float T_CarrierFrquncy = 0;       //后信号源中心频率
//    float T_BandWidth = 0;            //后信号源信号带宽
//    float T_PulseWidth = 0;           //后信号源信号脉宽

//    char Working_Mode = 0;            //工作模式
//    long long N_Div = 0;                   //分频数
//    float rFS;                        //采样率
//    float PRI = 0;                    //脉冲重复周期

//    int rMin = 0;                     //最小采样距离
//    int rMax = 0;                     //最大采样距离
//    long long Nr_Delay = 0;                //延迟点数
//    int Nr_Sampling = 0;              //原始采样点数

//    float TVG_Alpha = 0;              //时间增益控制参数α
//    float TVG_Beta = 0;               //时间增益控制参数β
//    float TVG_Gamma = 0;              //时间增益控制参数γ

//    bool bSingle_1;                     //同步信号1
//    bool bSingle_2;                     //同步信号2
//    bool bSingle_3;                     //同步信号3
//    bool bSingle_4;                     //同步信号4
//    bool bPressureEnable;               //压力传感器
//    bool bAltitudeEnable;               //姿态传感器
//    bool bAltimeterEnable;              //高度传感器

//    int iReserved[8] = {0};             //保留数据
//    float fReserved[8] = {0};           //保留数据
//};

struct Control_Working_Status
{                                      // 声纳工作状态控制参数
    unsigned short Working_Status = 0; // 声纳工作状态控制
    int iReserved[8] = {0};            // 保留数据
    float fReserved[8] = {0};          // 保留数据
};

struct Control_Cur_Time
{                             // 下发时间参数
    UTCTime Cur_Time;         // 时间信息
    int iReserved[8] = {0};   // 保留数据
    float fReserved[8] = {0}; // 保留数据
};

struct Control_Debug_Para
{ // 自定义调试参数 downstream
    int tvg_gain;
    int iReserved[8];
    float fReserved[8];
};

/************* 显控---->湿端设备 ***************/

// 发射信号和采集参数数据包格式定义
// struct pack_PC_To_Control_Signal {
//     unsigned char KeyWord = 0x01;
//     int DataLength = sizeof(Control_Signal);
//     Control_Signal m_Control_Signal;
// };
// 声纳工作状态控制数据包格式定义
struct pack_PC_To_Control_Working_Status
{
    unsigned char KeyWord = 0x02;
    uint64_t DataLength = sizeof(Control_Working_Status);
    Control_Working_Status m_Control_Working_Status;
};
// 当前系统时间参数数据包格式定义
struct pack_PC_To_Control_Cur_Time
{
    unsigned char KeyWord = 0x03;
    uint64_t DataLength = sizeof(Control_Cur_Time);
    Control_Cur_Time m_Control_Cur_Time;
};

// 高度计开关  KeyWord=0x81 downstream   0：停止发射  1：开始发射  默认值0
struct pack_PC_To_Control_AltimeterEnable
{
    unsigned char KeyWord = 0x81;
    uint64_t DataLength = sizeof(int);
    int nAltimeterEnable;
};

// 存储开关 KeyWord=0x82 downstream    0：不存储  1：存储  默认值0
struct pack_PC_To_Control_SaveEnable
{
    unsigned char KeyWord = 0x82;
    uint64_t DataLength = sizeof(int);
    int nSaveEnable;
};



struct pack_PC_To_Control_GPS_SCOUNT
{
    unsigned int Massage_Header = 0xa55ab55b; // 帧头（4字节)
    unsigned int Device_Address;              // 目的地址
    unsigned char Opreation;
    unsigned short KeyWord;
    uint16_t DataLength;
    uint32_t SartsCount;
    unsigned short Check_Sum;
    unsigned short Massage_Tail = 0xff0d;
};
struct pack_PC_To_Control_GPS_UTC
{
    unsigned int Massage_Header = 0xa55ab55b; // 帧头（4字节)
    unsigned int Device_Address;              // 目的地址
    unsigned char Opreation;
    unsigned short KeyWord;
    uint16_t DataLength;
    uint64_t GPS_UTC;
    unsigned short Check_Sum;
    unsigned short Massage_Tail = 0xff0d;
};
struct pack_PC_To_Control_HCC_STATE
{
    unsigned int Massage_Header = 0xa55ab55b; // 帧头（4字节)
    unsigned int Device_Address;              // 目的地址
    unsigned char Opreation;
    unsigned short KeyWord;
    uint16_t DataLength;
    uint8_t HCC_State;
    unsigned short Check_Sum;
    unsigned short Massage_Tail = 0xff0d;
};
struct pack_PC_To_Control_HCC_MODE
{
    unsigned int Massage_Header = 0xa55ab55b; // 帧头（4字节)
    unsigned int Device_Address;              // 目的地址
    unsigned char Opreation;
    unsigned short KeyWord;
    uint16_t DataLength;
    uint8_t HCC_Mode;
    unsigned short Check_Sum;
    unsigned short Massage_Tail = 0xff0d;
};
struct pack_PC_To_Control_HCC_SYNC
{
    unsigned int Massage_Header = 0xa55ab55b; // 帧头（4字节)
    unsigned int Device_Address;              // 目的地址
    unsigned char Opreation;
    unsigned short KeyWord;
    uint16_t DataLength;
    unsigned short Check_Sum;
    unsigned short Massage_Tail = 0xff0d;
};

/************* 湿端设备---->显控 ***************/

#pragma pack(pop) // 恢复对齐状态

/***cy***/
extern pack_Control_To_PC_SystemTime m_pack_Control_To_PC_SystemTime;

extern pack_PC_To_Control_TVG_Gain m_pack_PC_To_Control_TVG_Gain;
extern pack_PC_To_Control_WorkPower m_pack_PC_To_Control_WorkPower;
extern pack_PC_To_Control_WorkMode m_pack_PC_To_Control_WorkMode;
extern pack_Control_To_PC_TEMP m_pack_Control_To_PC_TEMP;
extern pack_Control_To_PC_Humidity m_pack_Control_To_PC_Humidity;
extern pack_Control_To_PC_SASTankStatus m_pack_Control_To_PC_SASTankStatus;
extern pack_Control_To_PC_PressureHeight m_pack_Control_To_PC_PressureHeight;
extern pack_PC_To_Control_PressureHeight_EN m_pack_PC_To_Control_PressureHeight_EN;
extern pack_Control_To_PC_AltitudeSensor m_pack_Control_To_PC_AltitudeSensor;
extern pack_PC_To_Control_AltitudeSensor_EN m_pack_PC_To_Control_AltitudeSensor_EN;
extern pack_PC_To_Control_SoundVelocity m_pack_PC_To_Control_SoundVelocity;
extern pack_Control_To_PC_Altimeter m_pack_Control_To_PC_Altimeter;

extern pack_PC_To_Control_WokingStart m_pack_PC_To_Control_WokingStart;
extern pack_PC_To_Control_L_Sonar m_pack_PC_To_Control_L_Sonar;
extern pack_PC_To_Control_TrigerMode m_pack_PC_To_Control_TrigerMode;
extern Device_Information m_Device_Information;
extern pack_PC_To_Control_Voltage_And_Current m_Voltage_And_Current;
extern pack_PC_To_Control_Activity m_pack_PC_To_Control_Activity;
extern pack_PC_To_Control_L_Delay m_pack_PC_To_Control_L_Delay;
extern pack_PC_To_Control_SATA_Flag m_pack_PC_To_Control_SATA_Flag;

extern pack_Control_To_SignalType_H m_pack_Control_To_SignalType_H;
extern pack_Control_To_SignalType_L m_pack_Control_To_SignalType_L;
extern pack_PC_To_Control_TVG_H m_pack_PC_To_Control_TVG_H;
extern pack_PC_To_Control_TVG_L m_pack_PC_To_Control_TVG_L;
extern pack_PC_To_Control_Signal_H m_pack_PC_To_Control_Signal_H;
extern pack_PC_To_Control_Signal_L m_pack_PC_To_Control_Signal_L;

extern pack_PC_To_Control_GPS_SCOUNT m_pack_PC_To_Control_GPS_SCOUNT;
extern pack_PC_To_Control_GPS_UTC m_pack_PC_To_Control_GPS_UTC;
extern pack_PC_To_Control_HCC_STATE m_pack_PC_To_Control_HCC_STATE;
extern pack_PC_To_Control_HCC_MODE m_pack_PC_To_Control_HCC_MODE;
extern pack_PC_To_Control_HCC_MODE m_pack_Control_To_PC_HCC_MODE;
extern pack_PC_To_Control_HCC_SYNC m_pack_PC_To_Control_HCC_SYNC;

extern int fSystemTime_flag;
extern int fSignalType_flag_H;
extern int fSignalType_flag_L;
extern int fGain_flag;
extern int fWorkPower_flag;
extern int fTVG_flag_H;
extern int fTVG_flag_L;
extern int fWorkMode_flag;
extern int fTEMP_flag;
extern int fHumidity_flag;
extern int fSASTankStatus_flag;
extern int fPressureHeight_flag;
extern int fPressureHeightEN_flag;
extern int fAltitudeSensor_flag;
extern int fAltitudeSensorEN_flag;
extern int fSoundVelocity_flag;
extern int fAltimeter_flag;
extern int finformation_flag;
extern int finVA_flag;
extern int fActivity_flag;
extern int fWorken_flag;

/***cy***/
// 湿端->显控
extern pack_Control_To_PC_Sonar_data SonarDataHead;
extern int fSASTankStatus;
extern int fSonarWorkingStatus;
extern int fPressureHeight;
extern int fAltitudeSensor;
extern int fAltimeter;
extern int fAltimeter_data;
extern unsigned char Altimeterdata[256];
extern char sonardatabuf[8000]; // 声纳数据
#endif                          // TANKDATA_H
